/**
 * Created by wangjz on 2018/11/23.
 */
import React, { Component } from 'react';
import TopMenuLayout from './TopMenuLayout';
import SiderMenuLayout from './SiderMenuLayout.js';
import { observer, inject } from 'mobx-react';

@inject('store')
@observer
class Main extends Component {
  render() {
    const { store } = this.props;
    let layout = store.getCfgValue('layout');
    if (layout == 'top') {
      return <TopMenuLayout/>;
    } else if (layout == 'sider') {
      return <SiderMenuLayout/>;
    } else {
      return <div/>;
    }
  }
}

export default Main;
